<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
		<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" media="screen" />
		<script type="text/javascript" src="js/base/jquery.js"></script>
		<script type="text/javascript" src="js/userManager.js"></script>
		<jsp:include page="title.jsp"></jsp:include>
	</head>
	<body onload="userLoad();">
		<jsp:include page="head.jsp"></jsp:include>
		<div class="zhuti">
			<div class="jingediv"></div>
			<div class="lefterdiv">
				<jsp:include page="menu.jsp"></jsp:include>
			</div>
			<div class="jingediv"></div>
			<div class="righterdiv" id="right">
				<div class="sitebar">
						<div class="floatleft div25"></div>
						<div class="sitename top26">
							<span class="font24">用户管理</span>
						</div>
						<div class="date font14 top26">
							<script type="text/javascript">
								var date=new Date();
								document.write(date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate());
								if(date.getHours()<12){
									document.write("上午");
								}else
								{
									document.write("下午");
								}
							</script>
						</div>
				</div>
				<div class="cleardiv"></div>
				<form action="userManager" method="post" id="myForm">
				<input type="hidden" name="userManagerInfo.userStatusDes" id="userStatus">
				<input type="hidden" name="userManagerInfo.userId" id="userId">
				<div class="widthall">
					<div class="title">
						<div class="floatleft div25"></div>
						<div class="titlename bold font24 top26">
							用户列表
						</div>
					</div>
					<div class="whitediv font16 em85">
						<div class="divcontent heigthall">
							<div class="em25 widthall"></div>
							<div class="em35 widthall">
								<c:if test="${language.add!=''}">
									<input type="button" class="btn textcenter" onclick="addCheck();" value="新增用户"/>
									<span class="inblock w10em defaultheight inputnomargin"></span>
								</c:if>
								<select id="roleId" name="userManagerInfo.roleId" class="heigthall wem200 inputnomargin" onchange="showLoading();firstSearch()">
									<option value="-1">
										用户角色
									</option>
									<c:forEach items="${roleList}" var="treeHtml">
										<c:choose>
											<c:when
												test="${treeHtml.roleId eq userManagerInfo.roleId}">
												<option value="${treeHtml.roleId}" selected="selected">
													${treeHtml.roleName}
												</option>
											</c:when>
											<c:otherwise>
												<option value="${treeHtml.roleId}">
													${treeHtml.roleName}
												</option>
											</c:otherwise>
										</c:choose>
									</c:forEach>
								</select>
								<span class="inblock w10em defaultheight inputnomargin"></span>
								<select id="status" name="userManagerInfo.userStatus" class="heigthall inputnomargin wem100" onchange="showLoading();firstSearch()">
									<option value="-1">
										状态
									</option>
									<c:forEach items="${statusList}" var="wordBook">
										<c:choose>
											<c:when
												test="${wordBook.dicCode eq userManagerInfo.userStatus}">
												<option value="${wordBook.dicCode}" selected="selected">
													${wordBook.dicValue}
												</option>
											</c:when>
											<c:otherwise>
												<option value="${wordBook.dicCode}">
													${wordBook.dicValue}
												</option>
											</c:otherwise>
										</c:choose>
									</c:forEach>
								</select>
								<div class="floatright div250 searchborder lineh35">
									<div  class="floatleft"  style="width:85%"><input type="text" id="realName" class="width95p inputnb paddingL1em" name="userManagerInfo.realName" placeholder="按姓名查找" /></div>
									<div  class="floatright heigthall"  style="width:12%"><img onclick="showLoading();firstSearch()" src="images/research.png" style="width:80%;height:80%;vertical-align:middle" /></div>
								</div>
								<table class="widthall hide">
									<tr>
										<td class="tdtxt">
											<input type="text" class="mimakuang" id="txtUserName" name="userManagerInfo.userName"
												value="${userManagerInfo.userName}"  placeholder="用户名称" />
										</td>
										<td class="tdjg"></td>
										<td class="tdtxt">
											<select 
												value="${userManagerInfo.roleId}" class="mimakuang">
												<option value="-1">
													用户角色
												</option>
												<c:forEach items="${roleList}" var="treeHtml">
													<c:choose>
														<c:when
															test="${treeHtml.roleId eq userManagerInfo.roleId}">
															<option value="${treeHtml.roleId}" selected="selected">
																${treeHtml.roleName}
															</option>
														</c:when>
														<c:otherwise>
															<option value="${treeHtml.roleId}">
																${treeHtml.roleName}
															</option>
														</c:otherwise>
													</c:choose>
												</c:forEach>
											</select>
										</td>
										<td class="tdjg"></td>
										<td class="tdtxt">
											<input   class="mimakuang"
												value="${userManagerInfo.realName}" type="text"
												id="txtRealName" placeholder="真实姓名" />
										</td>
										<td class="tdjg"></td>
										<td class="tdddl">
											<select  class="mimakuang">
												<option value="-1">
													状态
												</option>
												<c:forEach items="${statusList}" var="wordBook">
													<c:choose>
														<c:when
															test="${wordBook.dicCode eq userManagerInfo.userStatus}">
															<option value="${wordBook.dicCode}" selected="selected">
																${wordBook.dicValue}
															</option>
														</c:when>
														<c:otherwise>
															<option value="${wordBook.dicCode}">
																${wordBook.dicValue}
															</option>
														</c:otherwise>
													</c:choose>
												</c:forEach>
											</select>
										</td>
										<td class="tdbtn">
											<div class="floatright umsearchbar heigthall">
												<div class="floatleft umsbtn heigthall">
													<div class="floatleft qdbtnover  qdbtn2 noselect lineh30" onclick="search();">
														<div>
															${language.searchUser}
														</div>
													</div>
												</div>
												<div class="floatleft umsbtnjg defaultheight"></div>
												<c:if test="${language.add!=''}">
													<div class="floatleft umsbtn heigthall">
														<div class="floatleft qdbtnover  qdbtn2 noselect lineh30" onclick="addCheck();">
															<div>
																${language.add}
															</div>
														</div>
													</div>
												</c:if>
											</div>
										</td>
									</tr>
								</table>
							</div>
							<div class="em25 widthall"></div>
						</div>
					</div>
					<div class="widthall szjiange"></div>
					<div id="umlist" class="whitediv umlist">
						<div class="divcontent heigthall">
							<div class="em25 widthall"></div>
							<div class="widthall">
								<table id="myTable" class="indextable xyliebiao widthall" style="text-align:center !important">
									<tr>
										<th class="xykongbai"></th>
										<th>用户名称</th>
										<th>用户角色</th>
										<th>真实姓名</th>
										<th>用户状态</th>
										<th>操作</th>
										<th class="xykongbai"></th>
									</tr>
									<!--<c:forEach items="${pageDataVo.pageResult}" var="userManagerInfo">
										<tr>
											<td class="xytd"></td>
											<td>
												${userManagerInfo.userName}
											</td>
											<td>
												${userManagerInfo.roleName}
											</td>
											<td>
												${userManagerInfo.realName}
											</td>
											<td>
												${userManagerInfo.userStatusDes}
											</td>
											<td>
												<input type="hidden" value="${recentUserName}">
												<div class="floatleft editLeft">
													&nbsp;<c:if test="${recentUserName != userManagerInfo.userName}">
														<c:if test="${language.modify!=''}">
														<a href="#" onclick="edit('${userManagerInfo.userId}');"><span>${language.modify}</span></a>
														<c:if test="${userManagerInfo.userStatus=='0'}">
																<a onclick="updateUser('${userManagerInfo.userId}',1);" href="#"><span>
																		${language.openUser}</span></a>
														</c:if>
														<c:if test="${userManagerInfo.userStatus=='1'}">
																<a onclick="updateUser('${userManagerInfo.userId}',2);" href="#"><span>
																		${language.lockUser}</span></a>
														</c:if>
														<c:if test="${userManagerInfo.userStatus=='2'}">
																<a onclick="updateUser('${userManagerInfo.userId}',3);" href="#"><span>
																		${language.unlockUser}</span></a>
														</c:if>
														<a onclick="updateUser('${userManagerInfo.userId}',4);"
															class="btnsub1" href="#"><span>密码重置</span></a>
														</c:if>
														<c:if test="${language.delete!=''}">
															<a onclick="updateUser('${userManagerInfo.userId}',0);"
																class="btnsub1" href="#"><span>${language.delete}</span></a>
														</c:if>
													</c:if>
												</div>
												<div class="floatleft editRight">
													<div class="qxck" alt="${userManagerInfo.placePermission}">权限查看</div>
												</div>
											</td>
											<td></td>
										</tr>
									</c:forEach>
									--></table>
							</div>
							<div class="em45 widthall">
								<div class="mt5em em35 lineh35">
									<div id="divfanye" class="floatright fenye">
										<div id="leftFY" onclick="gotopage(2)" class="floatleft fyjiantou">
											<img src="images/fanye2_left.png" />
										</div>
										<input type="hidden" id="gotoPage">
										<div class="floatleft fyyeshu">
											<span id="curpage"></span>/
											<span id="allpage"></span>
										</div>
										<div id="rightFY" onclick="gotopage(1)" class="floatleft fyjiantou">
											<img src="images/fanye2_right.png" />
										</div>
										<div class="floatleft">
											<input type="text" class="skipinput" id="txtpages"/>
										</div>
										<div onclick="gotopage(3)" class="floatleft fywenzi">
											跳转
										</div>
										<div class="cleardiv">
										</div>
									</div>
								</div>
							</div>
							<div class="em25 widthall"></div>
						</div>
					</div>
				</div>
				<div id="divtips" style="display:none"></div>
				</form>
			</div>
		</div>
		<input type="hidden" value="${message}" id="message">
		<div class="cleardiv">
		</div>
		<jsp:include page="footer.jsp"></jsp:include>
	</body>
</html>